﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="user_id" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="user_id" HeaderText="user_id" 
                    SortExpression="user_id" />
                <asp:BoundField DataField="user_datepb" HeaderText="user_datepb" 
                    SortExpression="user_datepb" />
                <asp:BoundField DataField="user_pbmsg" HeaderText="user_pbmsg" 
                    SortExpression="user_pbmsg" />
                <asp:BoundField DataField="book_id" HeaderText="book_id" ReadOnly="True" 
                    SortExpression="book_id" />
            </Columns>
        </asp:GridView>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="infosDataContext" EnableDelete="True" EnableInsert="True" 
            EnableUpdate="True" TableName="b_user" Where="user_id == @user_id">
            <WhereParameters>
                <asp:ControlParameter ControlID="GridView1" Name="user_id" 
                    PropertyName="SelectedValue" Type="String" />
            </WhereParameters>
        </asp:LinqDataSource>
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
            DataKeyNames="user_id" DataSourceID="LinqDataSource1" Height="50px" 
            Width="125px">
            <Fields>
                <asp:BoundField DataField="user_id" HeaderText="user_id" ReadOnly="True" 
                    SortExpression="user_id" />
                <asp:BoundField DataField="user_name" HeaderText="user_name" 
                    SortExpression="user_name" />
                <asp:BoundField DataField="user_password" HeaderText="user_password" 
                    SortExpression="user_password" />
                <asp:BoundField DataField="user_date" HeaderText="user_date" 
                    SortExpression="user_date" />
                <asp:BoundField DataField="user_email" HeaderText="user_email" 
                    SortExpression="user_email" />
                <asp:BoundField DataField="user_phone" HeaderText="user_phone" 
                    SortExpression="user_phone" />
                <asp:CommandField ShowInsertButton="True" />
            </Fields>
        </asp:DetailsView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:infoConnectionString %>" 
            SelectCommand="SELECT * FROM [b_infobook]"></asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
